import request from '@/utils/request'

export default {
    pageQuery(current, size, teacherQuery) {
        return request({
            url: `/edu/teacher/${current}/${size}`,
            method: 'post',
            data: teacherQuery
        })
    },
    delTeacherById(id) {
        return request({
            url: `/edu/teacher/${id}`,
            method: 'delete'
        })
    },

    addTeacher(teacher) {
        return request({
            url: "/edu/teacher/",
            method: 'post',
            data: teacher // json
        })
    },
    updateTeacherById(teacher) {
        return request({
          url: "/edu/teacher/update",
          method: 'post',
          data: teacher // json
        })
      },
      // 根据id获取讲师信息，用于回显
      getTeacherById(id) {
        return request({
          url: `/edu/teacher/${id}`,
          method: 'get'
        })
      },
      upload(fd) {
        return request({
          url: "oss/file/upload",
          method: 'post',
          data: fd,
          
        })
        
      },
      findAll() {
        return request({
          url: "/edu/teacher/",
          method: 'get'
        })
      },

}